<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <div class="app">
    <header>
      <h1>健康床监控系统</h1>
      <nav>
        <RouterLink to="/" class="nav-link">监控仪表盘</RouterLink>
        <RouterLink to="/bed-control" class="nav-link">床板控制</RouterLink>
      </nav>
    </header>

    <main>
      <RouterView />
    </main>
  </div>
</template>

<style scoped>
.app {
  min-height: 100vh;
  background-color: #f3f4f6;
}

header {
  background: white;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #1f2937;
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.nav-link {
  text-decoration: none;
  color: #6b7280;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: #3b82f6;
  background: #f3f4f6;
}

.router-link-active {
  color: #3b82f6;
  background: #eff6ff;
}

main {
  padding: 20px;
}

@media (min-width: 1024px) {
  header {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }
}
</style>
